package com.mini.mysql.service;

import com.mini.mysql.model.BusinessStudentSecondOrderInfo;
import com.mini.mysql.repository.BusinessStudentSecondOrderInfoRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Set;

/**
 * @author shixiaopeng  on 2021/3/31
 */
@Service
@Slf4j
public class BusinessStudentSecondOrderInfoService {

    @Autowired
    private BusinessStudentSecondOrderInfoRepository businessStudentSecondOrderInfoRepository;

    public List<BusinessStudentSecondOrderInfo> findByUpdateTimeBetween(Date startTime, Date endTime) {
        return businessStudentSecondOrderInfoRepository.findByUpdateTimeBetweenOrderByUpdateTimeDesc(startTime, endTime);
    }

    public List<BusinessStudentSecondOrderInfo> findByIds(Set<Long> ids){
        return businessStudentSecondOrderInfoRepository.findAllByIdIn(ids);
    }



}
